<!--
 描述: 酷屏首页模板
-->

<template>
  <div class="home-container">
    <div class="wrap" ref="editor">
      <div class="top"></div>
      <div class="mainbox">
        <div class="column left">
          <div class="flex-container">
            <sinan />
          </div>
          <div class="flex-container"><bar3d /></div>
          <div class="flex-container"><scanRadius /></div>
        </div>
        <div class="column center">
          <div class="flex-container"><routePlan /></div>
          <div class="fle-container"><scrollPie /></div>
          <div class="flex-container job-chart"><pyramid /></div>
        </div>
        <div class="column right">
          <div class="flex-container"><seamless /></div>
          <div class="flex-container"><ringPin /></div>
          <div class="flex-container"><rotateColorful /></div>
        </div>
      </div>
      <div class="divider"></div>
    </div>
  </div>
</template>

<script>
import { screenSize } from "@/assets/js/utils";

export default {
  name: "Home",
  components: {},
  data() {
    return {};
  },
  computed: {},
  created() {},
  mounted() {
    screenSize(this.$refs.editor);
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.home-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  .wrap {
    transform-origin: 0px 0px 0px;
    background: url(../assets/img/bj.jpg) no-repeat;
    background-size: contain;
    background-position: 50% 0;
    background-color: rgb(0, 0, 0);
    min-width: auto;
    width: 1920px;
    min-height: auto;
    // height: 1080px;
    overflow: auto;
    .top {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 80px;
      background-color: transparent;
      background: url(../assets/img/top_nav.png) no-repeat;
      background-position: 65% 0;
      border: none;
      overflow: hidden;
      animation: fade 3s;
    }
    @keyframes fade {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }
    .mainbox {
      display: flex;
      min-width: 1024px;
      // max-height: 1920px;
      margin: 0 auto;
      padding: 0.125rem 0.125rem 0;
      .column {
        display: flex;
        flex: 3;
        flex-direction: column;
        justify-content: space-between;
        &.left {
          animation-name: left-slide;
          &:nth-child(1) {
            height: 550px;
            animation-duration: 0.8s;
          }
          &:nth-child(2) {
            animation-duration: 1.5s;
          }
        }
        &.right {
          animation-name: right-slide;
          animation-duration: 0.8s;
          // &:nth-child(1) {
          //   height: 550px;
          //   animation-duration: 0.8s;
          // }
          // &:nth-child(2) {
          //   animation-duration: 1.5s;
          // }
        }
        &.center {
          animation:  slideAndFade 1.5s;
          gap: 100px;
        }
        .flex-container {
          // position: absolute;
          // width: 100%; /* 或你希望的宽度 */
          // height: 100%; /* 或你希望的高度 */
          display: flex;
          flex-direction: column;
          margin: 30px 0px 20px 40px;
          /* 其他样式 */
          &.job-chart {
            margin: 100px 0px 20px 40px;
          }
        }
      }
    }
    .divider {
      position: absolute;
      left: 50px;
      top: 3253px;
      width: 90%;
      height: 50px;
      width: 300px;
      border: none;
      background: transparent;
    }
  }
}
@keyframes left-slide {
  0% {
    transform: translateX(-100%);
  }
  80% {
    transform: translateX(20px);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes right-slide {
  0% {
    transform: translateX(100%);
  }
  80% {
    transform: translateX(-20px);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes slideAndFade {
  0% {
    transform: translateY(218px);
		opacity: 0;
  }
  100% {
    transform: translateX(0);
		opacity: 1;
  }
}
</style>
